<?php

/*
 * Fresns Control Panel (Standalone)
 * Copyright (C) 2021-Present 刘鑫
 * Released under the MIT License.
 */

namespace App\Plugins\FcpApi\TweetNoticeMessages;

use App\Base\Services\BaseAdminService;
use App\Plugins\FcpApi\TweetMembers\TweetMembers;
use App\Plugins\FcpApi\TweetUsers\TweetUsers;

class FsService extends BaseAdminService
{
    public function __construct()
    {
        $this->model = new FsModel();
        $this->resource = FsResource::class;
        $this->resourceDetail = FsResourceDetail::class;
    }

    public function common()
    {
        $common = parent::common();
        $common['sourceTypeOption'] = FsConfig::SOURCE_TYPE;
        $common['sourceClassOption'] = FsConfig::SOURCE_CLASS;
        $common['statusOption'] = FsConfig::STATUS_OPTION;
        $common['pushChannelOption'] = FsConfig::PUSH_CHANNEL;
        $common['postOption'] = FsConfig::POST_OPTION;
        $common['pommentOption'] = FsConfig::COMMENT_OPTION;
        $common['memberOption'] = TweetMembers::staticBuildSelectOptions2('id', 'name', []);
        $common['usersOption'] = TweetUsers::staticBuildSelectOptions2('id', 'phone', []);

        return $common;
    }
}
